import request from '@/utils/request'
const url_ax = 'appversion/'
// 新增/修改 版本信息
export function insertv(data) {
  return httpf('insertv','post',data)
}
// 版本信息获取数据
export function getVersionList(data) {
  return httpf('getVersionList','get',data)
}
// 删除 版本信息
export function deletev(data) {
  return httpf('deletev','get',data)
}
//获取最后一次更新版本号
export function getLastVersion(data) {
  return httpf('getLastVersion','get',data);
}
function httpf(url,mh,data) {
  if(mh == 'get'){
    return request({
      url: url_ax+url,
      method: 'post',
      data: data
    })
  }else {
    return request({
      url: url_ax+url,
      method: 'post',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8'
      },
      data: data
    })
  }

}
